package com.htu.controller;

import com.htu.po.Food;
import com.htu.service.FoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@ResponseBody
@RequestMapping("/FoodController")
public class FoodController {
    @Autowired
    private FoodService foodService;
    @RequestMapping("/listFoodByBusinessId")
    public List<Food> listFoodByBusinessId(Integer businessId){
        return foodService.listFoodByBusinessId(businessId);
    }
}
